package com.example.natatorium_management.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.natatorium_management.entity.Reserve;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface ReserveMapper extends BaseMapper<Reserve> {
    IPage<Reserve> findReserveByReserveName(IPage<Reserve> page ,@Param("reserveName") String reserveName);

    IPage<Reserve> findReserveByPhone(IPage<Reserve> page ,@Param("phone") Long phone);

    IPage<Reserve> findReserveByMemberName(IPage<Reserve> page ,@Param("memberName") String memberName);

    IPage<Reserve> findReserveByGymnasiumName(IPage<Reserve> page ,@Param("gymnasiumName") String memberName);

    IPage<Reserve> findReserveByReserveNameAndPhone(IPage<Reserve> page,@Param("reserve") Reserve reserve);

    int updateReserve(Reserve reserve);
}
